/* GSBusOrderResolveReceiveAction.java
 *
 * Project/Product: JZCG-SHBUS
 *
 * Modify Information:
 * =============================================================================
 *   Author	Date       Description
 *   ----------	---------- ---------------------------------------------------
 *   wp	2008-1-23	First release
 *
 * Licensed Materials - Property of APEP
 * =============================================================================
 *    (C) COPYRIGHT Shanghai Auto Mart E-Procurement Co., Ltd. 2007 - 2008
 *    All Rights Reserved.
 *
 *    This software is the confidential and proprietary information of
 *    Shanghai Auto Mart E-Procurement Co., Ltd. ("Confidential Information").
 *    You shall not disclose such Confidential Information and shall use it only
 *    in accordance with the terms of the license agreement you entered into 
 *    with Shanghai Auto Mart E-Procurement Co., Ltd.
 *
 * Noties:
 * =============================================================================
 * 
 */

package com.hitrust.gs.action;

import java.util.ArrayList;

import com.hitrust.gs.business.GSOrderProcessor;
import com.hitrust.gs.lib.GSBaseConstants;
import com.hitrust.gs.service.GSBaseAction;
import com.hitrust.gs.service.GSBaseForm;

public class GSBusOrderResolveReceiveAction extends GSBaseAction {

    /* (non-Javadoc)
     * @see com.hitrust.gs.service.GSBaseAction#execute(com.hitrust.gs.service.GSBaseForm)
     */
    public String execute(GSBaseForm aForm) throws Exception {
        // 得到所有传入的参数(订单明细号，以逗号隔开) 
        String obj = aForm.getRequest().getParameter("params");
        // 所有传入的订单明细号
        String[] tOrderDetailIds = obj.split(",");
//        aForm.getRequest().setAttribute("OrderDetailIds", tOrderDetailIds);
        try {
            GSOrderProcessor tGSOrderProc = new GSOrderProcessor();
            ArrayList tOrderDetailList = tGSOrderProc.getOrderDetailForSign(tOrderDetailIds);
            
            aForm.getRequest().setAttribute("OrderDetailList", tOrderDetailList);
        } catch(Exception e) {
            aForm.getRequest().setAttribute("action","login.do");
            aForm.getRequest().setAttribute("window","true");//为出现异常准备参数
            throw e;
        }
        
        
        return GSBaseConstants.FORWARD_SUCCESS;
    }

}
